<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Gitee</title>

        <!--引入 vue -->
        <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
        <!--引入 axios -->
        <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    </head>
    <body>
        <h1>Gitee第三方登录</h1>

        <div id="vue-app">
            <button @click="go">我是Gitee图标</button>
        </div>
    </body>
    <script type="text/javascript">
        let vue = new Vue({
            el: "#vue-app",

            methods: {
                go() {
                    //发起请求
                    axios.get("http://localhost:9004/auth/login/getUrl")
                        .then((response) => {
                            let url = response.data.data;
                            console.log("后端返回的URL: " + url);
                            window.open(url,"_blank")
                        })
                }
            }
        })
    </script>
</html>